package com.ruoyi.gybj.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.gybj.mapper.LeakPointMapper;
import com.ruoyi.gybj.domain.LeakPoint;
import com.ruoyi.gybj.service.ILeakPointService;

/**
 * 泄漏点信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-11-19
 */
@Service
public class LeakPointServiceImpl implements ILeakPointService 
{
    @Autowired
    private LeakPointMapper leakPointMapper;

    /**
     * 查询泄漏点信息
     * 
     * @param id 泄漏点信息主键
     * @return 泄漏点信息
     */
    @Override
    public LeakPoint selectLeakPointById(Long id)
    {
        return leakPointMapper.selectLeakPointById(id);
    }

    /**
     * 查询泄漏点信息列表
     * 
     * @param leakPoint 泄漏点信息
     * @return 泄漏点信息
     */
    @Override
    public List<LeakPoint> selectLeakPointList(LeakPoint leakPoint)
    {
        return leakPointMapper.selectLeakPointList(leakPoint);
    }

    /**
     * 新增泄漏点信息
     * 
     * @param leakPoint 泄漏点信息
     * @return 结果
     */
    @Override
    public int insertLeakPoint(LeakPoint leakPoint)
    {
        leakPoint.setCreateTime(DateUtils.getNowDate());
        return leakPointMapper.insertLeakPoint(leakPoint);
    }

    /**
     * 修改泄漏点信息
     * 
     * @param leakPoint 泄漏点信息
     * @return 结果
     */
    @Override
    public int updateLeakPoint(LeakPoint leakPoint)
    {
        leakPoint.setUpdateTime(DateUtils.getNowDate());
        return leakPointMapper.updateLeakPoint(leakPoint);
    }

    /**
     * 批量删除泄漏点信息
     * 
     * @param ids 需要删除的泄漏点信息主键
     * @return 结果
     */
    @Override
    public int deleteLeakPointByIds(Long[] ids)
    {
        return leakPointMapper.deleteLeakPointByIds(ids);
    }

    /**
     * 删除泄漏点信息信息
     * 
     * @param id 泄漏点信息主键
     * @return 结果
     */
    @Override
    public int deleteLeakPointById(Long id)
    {
        return leakPointMapper.deleteLeakPointById(id);
    }
}
